New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@nuxt/static

Package Overview
Dependencies
Maintainers
3
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nuxt/static

The fastest way to statically export your Nuxt application

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5.7K
decreased by-15.1%
Maintainers
3
Weekly downloads
 
Created
Source

Nuxt Static

The fastest way to statically export your Nuxt application ⚡️

Simply run nuxt static for deploying your Nuxt application on Vercel, Netlify or any CI.

Features

  • Smart re-build only if needed (ie: code changes)
  • Also call nuxt export (or nuxt generate for legacy users)

Usage

Install package:

# Using yarn
yarn add --dev @nuxt/static

# Using npm
npm i -D @nuxt/static

This will add a new nuxt static command:

npx nuxt static

This command will (re-)build project if necessary and then use nuxt generate or nuxt export based on target option set in nuxt.config.

By the first nuxt static run, checksum of project files will be added to .nuxt/build.json. When using CI/CD, you have to cache/restore .nuxt

Options

You can pass extra options with static key in nuxt.config:

export default {
  static: {
    ignore: [
      'docs' // ignore changes in docs to avoid re-build
    ]
  }
}
ignore
  • Type: string[] or function

Globby patterns to ignore for snapshot. If an array is provided, it will be merged with default options, you can give a function to return an array that will remove the defaults.

You call also use the static:ignore hook to mutate the array (useful for modules), ex:

nuxt.hook('static:ignore', (ignore) => ignore.push('content'))
cacheDir
  • Type: string
  • Default: {rootDir}/node_modules/.cache/nuxt

Overrides buildDir

globbyOptions
  • Type: GlobbyOptions
  • Default: gitignore: true

Additional globby options for snapshot

Development

  • Clone repostory
  • Use yarn install to install dependencies
  • Use yarn static to run command on test fixture

License

MIT License

FAQs

Package last updated on 09 Jul 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc